<?php $form = self::beginForm(['enctype' => 'multipart/form-data']) ?>
<?= $goods->title('修改代销商品') ?>
<?= $form->field($goods, 'goods_name') ?>
<?= $form->field($goods, 'amount') ?>
<?= $form->field($goods, 'score') ?>
<?= $form->field($goods, 'images')->fileInput() ?>
<?= $form->field($goods, 'content')->editor() ?>
<?= $form->field($goods, 'state')->dropDownlist() ?>
<?= $form->field($goods, 'sort')->textInput(['placeholder' => '50']) ?>
<div class="row cl myPid">
    
</div>
<?= $form->submit($goods) ?>
<?php self::endForm() ?>

<script>
$(function () {
    $("#submitBtn").click(function () {
        $("form").ajaxSubmit($.config('ajaxSubmit', {
            success: function (msg) {
                if (msg.state) {
                    $.alert('操作成功', function () {
                        parent.location.reload();
                    });
                } else {
                    $.alert(msg.info);
                }
            }
        }));
        return false;
    });
});
</script>